<!-- This comment will put IE 6, 7 and 8 in quirks mode -->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>shark::RFClassifier&lt; LabelType &gt; Class Template Reference</title>
<script type="text/javaScript" src="search/search.js"></script>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<script src="https://polyfill.io/v3/polyfill.min.js?features=es6"></script>
<script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax@3.0.1/es5/tex-mml-chtml.js"></script>
<script src="../../mlstyle.js"></script>
<link href="../css/besser.css" rel="stylesheet" type="text/css"/>
</head>
<!-- pretty cool: each body gets an id tag which is the basename of the web page  -->
<!--              and allows for page-specific CSS. this is client-side scripted, -->
<!--              so the id will not yet show up in the served source code -->
<script type="text/javascript">
    jQuery(document).ready(function () {
        var url = jQuery(location).attr('href');
        var pname = url.substr(url.lastIndexOf("/")+1, url.lastIndexOf(".")-url.lastIndexOf("/")-1);
        jQuery('#this_url').html('<strong>' + pname + '</strong>');
        jQuery('body').attr('id', pname);
    });
</script>
<body>
    <div id="shark_old">
        <div id="wrap">
            <div id="header">
                <div id="site-name"><a href="../../sphinx_pages/build/html/index.html">Shark machine learning library</a></div>
                <ul id="nav">
                    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/installation.html">Installation</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/tutorials/tutorials.html">Tutorials</a>
                    </li>
		    <li >
                        <a href="../../sphinx_pages/build/html/rest_sources/benchmark.html">Benchmarks</a>
                    </li>
                    <li class="active">
                        <a href="classes.html">Documentation</a>
                        <ul>
                            <li class="first"></li>
                            <li><a href="../../sphinx_pages/build/html/rest_sources/quickref/quickref.html">Quick references</a></li>
                            <li><a href="classes.html">Class list</a></li>
                            <li class="last"><a href="group__shark__globals.html">Global functions</a></li>
                        </ul>
                    </li>
                </ul>
            </div>
        </div>
    </div>
<div id="doxywrapper">
<!--
    <div id="global_doxytitle">Doxygen<br>Documentation:</div>
-->
    <div id="navrow_wrapper">
<!-- Generated by Doxygen 1.9.8 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespaceshark.html">shark</a></li><li class="navelem"><a class="el" href="classshark_1_1_r_f_classifier.html">RFClassifier</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="classshark_1_1_r_f_classifier-members.html">List of all members</a> &#124;
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle"><div class="title">shark::RFClassifier&lt; LabelType &gt; Class Template Reference<div class="ingroups"><a class="el" href="group__models.html">Models</a></div></div></div>
</div><!--header-->
<div class="contents">

<p>Random Forest <a class="el" href="classshark_1_1_classifier.html" title="Conversion of real-valued or vector valued outputs to class labels.">Classifier</a>.  
 <a href="classshark_1_1_r_f_classifier.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_r_f_classifier_8h_source.html">shark/Models/Trees/RFClassifier.h</a>&gt;</code></p>
<div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for shark::RFClassifier&lt; LabelType &gt;:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="classshark_1_1_r_f_classifier__inherit__graph.png" border="0" usemap="#ashark_1_1_r_f_classifier_3_01_label_type_01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="ashark_1_1_r_f_classifier_3_01_label_type_01_4_inherit__map" id="ashark_1_1_r_f_classifier_3_01_label_type_01_4_inherit__map">
<area shape="rect" title="Random Forest Classifier." alt="" coords="31,94,166,135"/>
<area shape="rect" href="classshark_1_1_ensemble.html" title=" " alt="" coords="5,5,192,46"/>
<area shape="poly" title=" " alt="" coords="101,62,101,94,96,94,96,62"/>
</map>
<center><span class="legend">[<a href="graph_legend.html">legend</a>]</span></center></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a5104a2e299a21cd91d909fe755db1ea1" id="r_a5104a2e299a21cd91d909fe755db1ea1"><td class="memItemLeft" align="right" valign="top">std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_r_f_classifier.html#a5104a2e299a21cd91d909fe755db1ea1">name</a> () const</td></tr>
<tr class="memdesc:a5104a2e299a21cd91d909fe755db1ea1"><td class="mdescLeft">&#160;</td><td class="mdescRight">From <a class="el" href="classshark_1_1_i_nameable.html" title="This class is an interface for all objects which can have a name.">INameable</a>: return the class name.  <br /></td></tr>
<tr class="separator:a5104a2e299a21cd91d909fe755db1ea1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acd70da3c9340d47d5d7611e0b35f5d88" id="r_acd70da3c9340d47d5d7611e0b35f5d88"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_r_f_classifier.html#acd70da3c9340d47d5d7611e0b35f5d88">OOBerror</a> () const</td></tr>
<tr class="memdesc:acd70da3c9340d47d5d7611e0b35f5d88"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the computed out-of-bag-error of the forest.  <br /></td></tr>
<tr class="separator:acd70da3c9340d47d5d7611e0b35f5d88"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4e4af4f01321b8836554517ef629c0c" id="r_ad4e4af4f01321b8836554517ef629c0c"><td class="memItemLeft" align="right" valign="top">RealVector const &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_r_f_classifier.html#ad4e4af4f01321b8836554517ef629c0c">featureImportances</a> () const</td></tr>
<tr class="memdesc:ad4e4af4f01321b8836554517ef629c0c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the computed feature importances of the forest.  <br /></td></tr>
<tr class="separator:ad4e4af4f01321b8836554517ef629c0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6cc321d1bcb9c18ba50857d093063730" id="r_a6cc321d1bcb9c18ba50857d093063730"><td class="memItemLeft" align="right" valign="top">UIntVector&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_r_f_classifier.html#a6cc321d1bcb9c18ba50857d093063730">countAttributes</a> () const</td></tr>
<tr class="memdesc:a6cc321d1bcb9c18ba50857d093063730"><td class="mdescLeft">&#160;</td><td class="mdescRight">Counts how often attributes are used.  <br /></td></tr>
<tr class="separator:a6cc321d1bcb9c18ba50857d093063730"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a336a6c2b13f973dd780644319dab4e8a" id="r_a336a6c2b13f973dd780644319dab4e8a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_r_f_classifier.html#a336a6c2b13f973dd780644319dab4e8a">computeOOBerror</a> (std::vector&lt; std::vector&lt; std::size_t &gt; &gt; const &amp;oobIndices, <a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; RealVector, LabelType &gt; const &amp;data)</td></tr>
<tr class="memdesc:a336a6c2b13f973dd780644319dab4e8a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Compute oob error, given an oob dataset.  <br /></td></tr>
<tr class="separator:a336a6c2b13f973dd780644319dab4e8a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a290cb9386878b0264faf15dae5dc2068" id="r_a290cb9386878b0264faf15dae5dc2068"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_r_f_classifier.html#a290cb9386878b0264faf15dae5dc2068">computeFeatureImportances</a> (std::vector&lt; std::vector&lt; std::size_t &gt; &gt; const &amp;oobIndices, <a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; RealVector, LabelType &gt; const &amp;data, random::rng_type &amp;rng)</td></tr>
<tr class="separator:a290cb9386878b0264faf15dae5dc2068"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classshark_1_1_ensemble"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classshark_1_1_ensemble')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classshark_1_1_ensemble.html">shark::Ensemble&lt; CARTree&lt; LabelType &gt; &gt;</a></td></tr>
<tr class="memitem:aaa96d4139d33b84477f8a41d9d12c8bb inherit pub_methods_classshark_1_1_ensemble" id="r_aaa96d4139d33b84477f8a41d9d12c8bb"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_ensemble.html#aaa96d4139d33b84477f8a41d9d12c8bb">addModel</a> (<a class="el" href="classshark_1_1_c_a_r_tree.html">CARTree</a>&lt; LabelType &gt; const &amp;model, double weight=1.0)</td></tr>
<tr class="memdesc:aaa96d4139d33b84477f8a41d9d12c8bb inherit pub_methods_classshark_1_1_ensemble"><td class="mdescLeft">&#160;</td><td class="mdescRight">Adds a new model to the ensemble.  <br /></td></tr>
<tr class="separator:aaa96d4139d33b84477f8a41d9d12c8bb inherit pub_methods_classshark_1_1_ensemble"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab04ccf3f9acb405f3fdedd125ff5ed1c inherit pub_methods_classshark_1_1_ensemble" id="r_ab04ccf3f9acb405f3fdedd125ff5ed1c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_ensemble.html#ab04ccf3f9acb405f3fdedd125ff5ed1c">clearModels</a> ()</td></tr>
<tr class="memdesc:ab04ccf3f9acb405f3fdedd125ff5ed1c inherit pub_methods_classshark_1_1_ensemble"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes all models from the ensemble.  <br /></td></tr>
<tr class="separator:ab04ccf3f9acb405f3fdedd125ff5ed1c inherit pub_methods_classshark_1_1_ensemble"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1e09f390e1605b270f0ec17b7845e472 inherit pub_methods_classshark_1_1_ensemble" id="r_a1e09f390e1605b270f0ec17b7845e472"><td class="memItemLeft" align="right" valign="top">std::size_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_ensemble.html#a1e09f390e1605b270f0ec17b7845e472">numberOfModels</a> () const</td></tr>
<tr class="memdesc:a1e09f390e1605b270f0ec17b7845e472 inherit pub_methods_classshark_1_1_ensemble"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of models.  <br /></td></tr>
<tr class="separator:a1e09f390e1605b270f0ec17b7845e472 inherit pub_methods_classshark_1_1_ensemble"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade2b84f506a9ca05c99b048d89a81e49 inherit pub_methods_classshark_1_1_ensemble" id="r_ade2b84f506a9ca05c99b048d89a81e49"><td class="memItemLeft" align="right" valign="top">std::remove_pointer&lt; <a class="el" href="classshark_1_1_c_a_r_tree.html">CARTree</a>&lt; LabelType &gt; &gt;::type &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_ensemble.html#ade2b84f506a9ca05c99b048d89a81e49">model</a> (std::size_t i)</td></tr>
<tr class="memdesc:ade2b84f506a9ca05c99b048d89a81e49 inherit pub_methods_classshark_1_1_ensemble"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a reference to the i-th model.  <br /></td></tr>
<tr class="separator:ade2b84f506a9ca05c99b048d89a81e49 inherit pub_methods_classshark_1_1_ensemble"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9ca0daef198afeb7c77203e30c80d52e inherit pub_methods_classshark_1_1_ensemble" id="r_a9ca0daef198afeb7c77203e30c80d52e"><td class="memItemLeft" align="right" valign="top">std::remove_pointer&lt; <a class="el" href="classshark_1_1_c_a_r_tree.html">CARTree</a>&lt; LabelType &gt; &gt;::type const &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_ensemble.html#a9ca0daef198afeb7c77203e30c80d52e">model</a> (std::size_t i) const</td></tr>
<tr class="memdesc:a9ca0daef198afeb7c77203e30c80d52e inherit pub_methods_classshark_1_1_ensemble"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns a const reference to the i-th model.  <br /></td></tr>
<tr class="separator:a9ca0daef198afeb7c77203e30c80d52e inherit pub_methods_classshark_1_1_ensemble"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8362fb3624b7976c8260cb5c1e98f311 inherit pub_methods_classshark_1_1_ensemble" id="r_a8362fb3624b7976c8260cb5c1e98f311"><td class="memItemLeft" align="right" valign="top">double const &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_ensemble.html#a8362fb3624b7976c8260cb5c1e98f311">weight</a> (std::size_t i) const</td></tr>
<tr class="memdesc:a8362fb3624b7976c8260cb5c1e98f311 inherit pub_methods_classshark_1_1_ensemble"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the weight of the i-th model.  <br /></td></tr>
<tr class="separator:a8362fb3624b7976c8260cb5c1e98f311 inherit pub_methods_classshark_1_1_ensemble"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b8b29b5b1749b42ed5cd79a6aab7952 inherit pub_methods_classshark_1_1_ensemble" id="r_a2b8b29b5b1749b42ed5cd79a6aab7952"><td class="memItemLeft" align="right" valign="top">double &amp;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_ensemble.html#a2b8b29b5b1749b42ed5cd79a6aab7952">weight</a> (std::size_t i)</td></tr>
<tr class="memdesc:a2b8b29b5b1749b42ed5cd79a6aab7952 inherit pub_methods_classshark_1_1_ensemble"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the weight of the i-th model.  <br /></td></tr>
<tr class="separator:a2b8b29b5b1749b42ed5cd79a6aab7952 inherit pub_methods_classshark_1_1_ensemble"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6965c4363321584b44389670044d24bd inherit pub_methods_classshark_1_1_ensemble" id="r_a6965c4363321584b44389670044d24bd"><td class="memItemLeft" align="right" valign="top">double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classshark_1_1_ensemble.html#a6965c4363321584b44389670044d24bd">sumOfWeights</a> () const</td></tr>
<tr class="memdesc:a6965c4363321584b44389670044d24bd inherit pub_methods_classshark_1_1_ensemble"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the total sum of weights used for averaging.  <br /></td></tr>
<tr class="separator:a6965c4363321584b44389670044d24bd inherit pub_methods_classshark_1_1_ensemble"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><div class="compoundTemplParams">template&lt;class LabelType&gt;<br />
class shark::RFClassifier&lt; LabelType &gt;</div><p>Random Forest <a class="el" href="classshark_1_1_classifier.html" title="Conversion of real-valued or vector valued outputs to class labels.">Classifier</a>. </p>
<dl class="section user"><dt></dt><dd>The Random Forest <a class="el" href="classshark_1_1_classifier.html" title="Conversion of real-valued or vector valued outputs to class labels.">Classifier</a> predicts a class label using the Random Forest algorithm as described in<br  />
 Random Forests. Leo Breiman. Machine Learning, 1(45), pages 5-32. Springer, 2001.<br  />
</dd></dl>
<dl class="section user"><dt></dt><dd>It is an ensemble learner that uses multiple decision trees built using the CART methodology. The trees are created using bagging which allows the use the out-of-bag error estimates for an approximately unbiased estimate of the test-error as well as unbiased feature-importance estimates using feature permutation. </dd></dl>

<p class="definition">Definition at line <a class="el" href="_r_f_classifier_8h_source.html#l00061">61</a> of file <a class="el" href="_r_f_classifier_8h_source.html">RFClassifier.h</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a290cb9386878b0264faf15dae5dc2068" name="a290cb9386878b0264faf15dae5dc2068"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a290cb9386878b0264faf15dae5dc2068">&#9670;&#160;</a></span>computeFeatureImportances()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class LabelType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classshark_1_1_r_f_classifier.html">shark::RFClassifier</a>&lt; LabelType &gt;::computeFeatureImportances </td>
          <td>(</td>
          <td class="paramtype">std::vector&lt; std::vector&lt; std::size_t &gt; &gt; const &amp;&#160;</td>
          <td class="paramname"><em>oobIndices</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; RealVector, LabelType &gt; const &amp;&#160;</td>
          <td class="paramname"><em>data</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">random::rng_type &amp;&#160;</td>
          <td class="paramname"><em>rng</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Compute feature importances, given an oob dataset</p>
<p>For each tree, extracts the out-of-bag-samples indicated by oobIndices. The feature importance is defined as the average change of loss (Squared loss or accuracy depending on label type) when the feature is permuted across the oob samples of a tree. </p>

<p class="definition">Definition at line <a class="el" href="_r_f_classifier_8h_source.html#l00170">170</a> of file <a class="el" href="_r_f_classifier_8h_source.html">RFClassifier.h</a>.</p>

<p class="reference">References <a class="el" href="group__shark__globals.html#gae537f0e90beb970397cd7bb9250984e2">shark::inputDimension()</a>, <a class="el" href="classshark_1_1_ensemble.html#a1e09f390e1605b270f0ec17b7845e472">shark::Ensemble&lt; CARTree&lt; LabelType &gt; &gt;::numberOfModels()</a>, <a class="el" href="group__shark__globals.html#ga229ee860771047d3994953fdda9f5a6a">shark::subBatch()</a>, <a class="el" href="classshark_1_1_ensemble.html#a6965c4363321584b44389670044d24bd">shark::Ensemble&lt; CARTree&lt; LabelType &gt; &gt;::sumOfWeights()</a>, and <a class="el" href="classshark_1_1_ensemble.html#a8362fb3624b7976c8260cb5c1e98f311">shark::Ensemble&lt; CARTree&lt; LabelType &gt; &gt;::weight()</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_r_f_trainer_3_01unsigned_01int_01_4.html#a4c1081a998508d12064ec653130f1a8f">shark::RFTrainer&lt; unsigned int &gt;::train()</a>, and <a class="el" href="classshark_1_1_r_f_trainer_3_01_real_vector_01_4.html#a4975033b328b481f5bbfa2fea88ddcd9">shark::RFTrainer&lt; RealVector &gt;::train()</a>.</p>

</div>
</div>
<a id="a336a6c2b13f973dd780644319dab4e8a" name="a336a6c2b13f973dd780644319dab4e8a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a336a6c2b13f973dd780644319dab4e8a">&#9670;&#160;</a></span>computeOOBerror()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class LabelType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void <a class="el" href="classshark_1_1_r_f_classifier.html">shark::RFClassifier</a>&lt; LabelType &gt;::computeOOBerror </td>
          <td>(</td>
          <td class="paramtype">std::vector&lt; std::vector&lt; std::size_t &gt; &gt; const &amp;&#160;</td>
          <td class="paramname"><em>oobIndices</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="classshark_1_1_labeled_data.html">LabeledData</a>&lt; RealVector, LabelType &gt; const &amp;&#160;</td>
          <td class="paramname"><em>data</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Compute oob error, given an oob dataset. </p>

<p class="definition">Definition at line <a class="el" href="_r_f_classifier_8h_source.html#l00157">157</a> of file <a class="el" href="_r_f_classifier_8h_source.html">RFClassifier.h</a>.</p>

<p class="reference">References <a class="el" href="group__shark__globals.html#ga5333445992cd6b14392cd80a1ab5403c">shark::LabeledData&lt; InputT, LabelT &gt;::numberOfElements()</a>.</p>

<p class="reference">Referenced by <a class="el" href="classshark_1_1_r_f_trainer_3_01unsigned_01int_01_4.html#a4c1081a998508d12064ec653130f1a8f">shark::RFTrainer&lt; unsigned int &gt;::train()</a>, and <a class="el" href="classshark_1_1_r_f_trainer_3_01_real_vector_01_4.html#a4975033b328b481f5bbfa2fea88ddcd9">shark::RFTrainer&lt; RealVector &gt;::train()</a>.</p>

</div>
</div>
<a id="a6cc321d1bcb9c18ba50857d093063730" name="a6cc321d1bcb9c18ba50857d093063730"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a6cc321d1bcb9c18ba50857d093063730">&#9670;&#160;</a></span>countAttributes()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class LabelType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">UIntVector <a class="el" href="classshark_1_1_r_f_classifier.html">shark::RFClassifier</a>&lt; LabelType &gt;::countAttributes </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Counts how often attributes are used. </p>

<p class="definition">Definition at line <a class="el" href="_r_f_classifier_8h_source.html#l00146">146</a> of file <a class="el" href="_r_f_classifier_8h_source.html">RFClassifier.h</a>.</p>

<p class="reference">References <a class="el" href="classshark_1_1_ensemble.html#ade2b84f506a9ca05c99b048d89a81e49">shark::Ensemble&lt; CARTree&lt; LabelType &gt; &gt;::model()</a>, and <a class="el" href="classshark_1_1_ensemble.html#a1e09f390e1605b270f0ec17b7845e472">shark::Ensemble&lt; CARTree&lt; LabelType &gt; &gt;::numberOfModels()</a>.</p>

</div>
</div>
<a id="ad4e4af4f01321b8836554517ef629c0c" name="ad4e4af4f01321b8836554517ef629c0c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad4e4af4f01321b8836554517ef629c0c">&#9670;&#160;</a></span>featureImportances()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class LabelType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">RealVector const  &amp; <a class="el" href="classshark_1_1_r_f_classifier.html">shark::RFClassifier</a>&lt; LabelType &gt;::featureImportances </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the computed feature importances of the forest. </p>

<p class="definition">Definition at line <a class="el" href="_r_f_classifier_8h_source.html#l00141">141</a> of file <a class="el" href="_r_f_classifier_8h_source.html">RFClassifier.h</a>.</p>

</div>
</div>
<a id="a5104a2e299a21cd91d909fe755db1ea1" name="a5104a2e299a21cd91d909fe755db1ea1"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5104a2e299a21cd91d909fe755db1ea1">&#9670;&#160;</a></span>name()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class LabelType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">std::string <a class="el" href="classshark_1_1_r_f_classifier.html">shark::RFClassifier</a>&lt; LabelType &gt;::name </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>From <a class="el" href="classshark_1_1_i_nameable.html" title="This class is an interface for all objects which can have a name.">INameable</a>: return the class name. </p>

<p>Reimplemented from <a class="el" href="classshark_1_1_ensemble.html#a3508e39c8cbf40de08dcd387670a8f58">shark::Ensemble&lt; CARTree&lt; LabelType &gt; &gt;</a>.</p>

<p class="definition">Definition at line <a class="el" href="_r_f_classifier_8h_source.html#l00131">131</a> of file <a class="el" href="_r_f_classifier_8h_source.html">RFClassifier.h</a>.</p>

</div>
</div>
<a id="acd70da3c9340d47d5d7611e0b35f5d88" name="acd70da3c9340d47d5d7611e0b35f5d88"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acd70da3c9340d47d5d7611e0b35f5d88">&#9670;&#160;</a></span>OOBerror()</h2>

<div class="memitem">
<div class="memproto">
<div class="memtemplate">
template&lt;class LabelType &gt; </div>
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">double <a class="el" href="classshark_1_1_r_f_classifier.html">shark::RFClassifier</a>&lt; LabelType &gt;::OOBerror </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Returns the computed out-of-bag-error of the forest. </p>

<p class="definition">Definition at line <a class="el" href="_r_f_classifier_8h_source.html#l00136">136</a> of file <a class="el" href="_r_f_classifier_8h_source.html">RFClassifier.h</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>include/shark/Models/Trees/<a class="el" href="_r_f_classifier_8h_source.html">RFClassifier.h</a></li>
</ul>
</div><!-- contents -->
</div>
</body>
</html>
